home *** CD-ROM | disk | FTP | other *** search
- library DemoPlug;
-
- uses
- SysUtils,
- Classes,
- windows,
- fDocProp in 'fDocProp.pas' {frmDocProperties},
- fTree in 'fTree.pas' {frmTree},
- fList in 'fList.pas' {frmList},
- fComment in 'fComment.pas' {frmComment};
-
- {$R *.RES}
- {$R DemoPlug1.RES}
-
- procedure ShowMessage(const S: String);
- begin
- MessageBox(0, PChar(S), 'Message', MB_OK);
- end;
-
- function GetCount: Integer; stdcall;
- begin
- Result := 4;
- end;
-
- function GetCaption(Index: Integer; const Language: WideString): WideString; stdcall;
- begin
- case Index of
- 0: Result := 'Current document properties (Demo plugin)';
- 1: Result := 'Tree of documents';
- 2: Result := 'List of records';
- 3: Result := 'View comment as RTF';
- end;
- end;
-
- function GetIconName(Index: Integer): WideString; stdcall;
- begin
- if Index = 0 then
- Result := 'DemoProp'
- else
- Result := '';
- end;
-
- procedure Execute(Index: Integer); stdcall;
- begin
- try
- case Index of
- 0: TFrmDocProperties.Execute;
- 1: TfrmTree.Execute;
- 2: TfrmList.Execute;
- 3: TFrmComment.Execute;
- else
- ShowMessage('Exec item ' + IntToStr(Index));
- end;
- except
- on E:Exception do
- ShowMessage(E.Message);
- end;
- end;
-
- exports
- GetCount,
- GetCaption,
- GetIconName,
- Execute;
-
- begin
- end.
-